import time
import random
import multiprocessing as mp


def work(id, n):
    for i in range(n):
        print('#%s: %s' % (id, i))
        interval= random.randint(0, 20) / 10
        time.sleep(interval)


p1 = mp.Process(target=work, kwargs={'id': 1, 'n': 10})
p2 = mp.Process(target=work, args=(2, 10))
p1.start()
p2.start()
p1.join()
p2.join()
